﻿using System;
using System.Collections.Generic;
using System.Text;
using Gtk;

namespace GtkSharpTutorial
{
    class Form
    {
        public event DeleteEventHandler OnDeleteEvent;

        readonly Window window;

        public Form()
        {
            window = new Window("Label sample");

            window.DeleteEvent += (s, e) => OnDeleteEvent.Invoke(s, e);

            window.Title = "Label";

            var hbox = new HBox(false, 5);
            var leftBox = new VBox(false, 5);
            var rightBox = new VBox(false, 5);

            window.Add(hbox);
            hbox.PackStart(leftBox, false, false, 0);
            hbox.PackStart(rightBox, false, false, 0);

            window.BorderWidth = 5;

            leftBox.PackStart(new NormalLabel().Widget, false, false, 0);

            leftBox.PackStart(new MultilineLabel().Widget, false, false, 0);

            leftBox.PackStart(new LeftJustifiedLabel().Widget, false, false, 0);

            leftBox.PackStart(new RightJustifiedLabel().Widget, false, false, 0);


            rightBox.PackStart(new LineWrappedLabel().Widget, false, false, 0);

            rightBox.PackStart(new FilledWrappedLabel().Widget, false, false, 0);

            rightBox.PackStart(new UnderlinedLabel().Widget, false, false, 0);

        }

        public void Show()
        {
            window.ShowAll();
        }
    }
}
